<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>[Generic Component Framework v3] GCF::ObjectListWatcher Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<!--link href="tabs.css" rel="stylesheet" type="text/css"-->
</head><body>
 <div id="wrapper">
    <div id="logo_box">
        <a class="img_link" href="https://github.com/pnudupa/gcf" target="_blank" ><img style="float:left;margin-left:10px;margin-top:5px;margin-bottom:5px;"src="header_gcf_logo.jpg" alt="GCF LOGO"/></a>
        <a class="img_link" href="https://www.vcreatelogic.com/" target="_blank" ><img style="float:right;margin-right:10px; margin-top: 30px;" src="header_vcl_logo.jpg" alt="VCL LOGO"/></a>
        <div style="clear:both"></div>
    </div>
    <div class="nav">
        <ul>
            <li class="selectedpage">
                <a class="a-home" href="index.html" >
                    <span>Home</span>
                </a>
            </li>
            <li>
                <a class="a-classes " href="classes.html">
                    <span>All Classes</span>
                </a>
            </li>
            <li>
                <a class="a-home " href="gcf_modules.html">
                    <span>Modules</span>
                </a>
            </li>
            <li>
                <a class="a-home " href="gcf_guides_and_videos.html">
                    <span>Guides & Videos</span>
                </a>
            </li>
            <li>
                <a class="a-home " href="gcf_tools_and_inbuilt_components.html">
                    <span>Tools & Components</span>
                </a>
            </li>
        </ul>
    </div>
    <div id="main-content">
        <div class="inside">
        <div>
<!-- Generated by Doxygen 1.8.16 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>GCF</b></li><li class="navelem"><a class="el" href="class_g_c_f_1_1_object_list_watcher.html">ObjectListWatcher</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#signals">Signals</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_g_c_f_1_1_object_list_watcher-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">GCF::ObjectListWatcher Class Reference<div class="ingroups"><a class="el" href="group__gcf__core.html">GCF Core Module</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>This watches over <a class="el" href="class_g_c_f_1_1_object_list.html" title="This class manages a list of live QObject pointers.">ObjectList</a> to emit signals when the objects are added, removed or deleted from <a class="el" href="class_g_c_f_1_1_object_list.html" title="This class manages a list of live QObject pointers.">GCF::ObjectList</a>.  
 <a href="class_g_c_f_1_1_object_list_watcher.html#details">More...</a></p>

<p><code>#include &lt;GCF3/ObjectList&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="signals"></a>
Signals</h2></td></tr>
<tr class="memitem:a9cd563b47977c35ab0cbe2a48051951a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_object_list_watcher.html#a9cd563b47977c35ab0cbe2a48051951a">objectAdded</a> (int index, QObject *obj)</td></tr>
<tr class="separator:a9cd563b47977c35ab0cbe2a48051951a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc3c791d13c6d682c0cd6ff20c6daa86"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_object_list_watcher.html#afc3c791d13c6d682c0cd6ff20c6daa86">objectRemoved</a> (int index, QObject *obj)</td></tr>
<tr class="separator:afc3c791d13c6d682c0cd6ff20c6daa86"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa53a614babe817a103b6ad3600f6e8a0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_object_list_watcher.html#aa53a614babe817a103b6ad3600f6e8a0">objectDeleted</a> (int index, QObject *obj)</td></tr>
<tr class="separator:aa53a614babe817a103b6ad3600f6e8a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aa1d3ed91d508f674c9e833fce28c4750"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_object_list_watcher.html#aa1d3ed91d508f674c9e833fce28c4750">ObjectListWatcher</a> (QObject *parent=nullptr)</td></tr>
<tr class="separator:aa1d3ed91d508f674c9e833fce28c4750"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1070bf4b41dee8192ce5a469bfc58d97"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_object_list_watcher.html#a1070bf4b41dee8192ce5a469bfc58d97">~ObjectListWatcher</a> ()</td></tr>
<tr class="separator:a1070bf4b41dee8192ce5a469bfc58d97"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa2edc92df3f8aafa339fce3400083c25"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_object_list_watcher.html#aa2edc92df3f8aafa339fce3400083c25">watch</a> (<a class="el" href="class_g_c_f_1_1_object_list.html">ObjectList</a> &amp;list)</td></tr>
<tr class="separator:aa2edc92df3f8aafa339fce3400083c25"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5edc32e488b5a09c4dd0636206061636"><td class="memItemLeft" align="right" valign="top">QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_object_list_watcher.html#a5edc32e488b5a09c4dd0636206061636">listenerType</a> () const</td></tr>
<tr class="separator:a5edc32e488b5a09c4dd0636206061636"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_g_c_f_1_1_object_list_event_listener"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_g_c_f_1_1_object_list_event_listener')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_g_c_f_1_1_object_list_event_listener.html">GCF::ObjectListEventListener</a></td></tr>
<tr class="memitem:a8ff90650697e04bcd773eca37f1b620d inherit pub_methods_class_g_c_f_1_1_object_list_event_listener"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_object_list_event_listener.html#a8ff90650697e04bcd773eca37f1b620d">ObjectListEventListener</a> ()</td></tr>
<tr class="separator:a8ff90650697e04bcd773eca37f1b620d inherit pub_methods_class_g_c_f_1_1_object_list_event_listener"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad8080a35f89335f9fef396c1af95849e inherit pub_methods_class_g_c_f_1_1_object_list_event_listener"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_object_list_event_listener.html#ad8080a35f89335f9fef396c1af95849e">~ObjectListEventListener</a> ()</td></tr>
<tr class="separator:ad8080a35f89335f9fef396c1af95849e inherit pub_methods_class_g_c_f_1_1_object_list_event_listener"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab05f82c68c2227e96cd5017cb27113ca inherit pub_methods_class_g_c_f_1_1_object_list_event_listener"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_object_list_event_listener.html#ab05f82c68c2227e96cd5017cb27113ca">objectAdded</a> (int index, QObject *obj)</td></tr>
<tr class="separator:ab05f82c68c2227e96cd5017cb27113ca inherit pub_methods_class_g_c_f_1_1_object_list_event_listener"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92de70a172a259fa9874733697caa64a inherit pub_methods_class_g_c_f_1_1_object_list_event_listener"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_object_list_event_listener.html#a92de70a172a259fa9874733697caa64a">objectRemoved</a> (int index, QObject *obj)</td></tr>
<tr class="separator:a92de70a172a259fa9874733697caa64a inherit pub_methods_class_g_c_f_1_1_object_list_event_listener"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51c67280aea0f81a15794d335dbdd7ad inherit pub_methods_class_g_c_f_1_1_object_list_event_listener"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_object_list_event_listener.html#a51c67280aea0f81a15794d335dbdd7ad">objectDeleted</a> (int index, QObject *obj)</td></tr>
<tr class="separator:a51c67280aea0f81a15794d335dbdd7ad inherit pub_methods_class_g_c_f_1_1_object_list_event_listener"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>You can set this to watch over an <a class="el" href="class_g_c_f_1_1_object_list.html">GCF::ObjectList</a> by using <a class="el" href="class_g_c_f_1_1_object_list_watcher.html#aa2edc92df3f8aafa339fce3400083c25">GCF::ObjectListWatcher::watch(ObjectList &amp;list)</a> method.</p>
<p>Only one watcher can watch over <a class="el" href="class_g_c_f_1_1_object_list.html">GCF::ObjectList</a> at a time.If there is already a watcher watching that <a class="el" href="class_g_c_f_1_1_object_list.html" title="This class manages a list of live QObject pointers.">ObjectList</a> when a new one is set then it will be replaced by the new one. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="aa1d3ed91d508f674c9e833fce28c4750"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa1d3ed91d508f674c9e833fce28c4750">&#9670;&nbsp;</a></span>ObjectListWatcher()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GCF::ObjectListWatcher::ObjectListWatcher </td>
          <td>(</td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>parent</em> = <code>nullptr</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Default constructor. </p>

</div>
</div>
<a id="a1070bf4b41dee8192ce5a469bfc58d97"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1070bf4b41dee8192ce5a469bfc58d97">&#9670;&nbsp;</a></span>~ObjectListWatcher()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GCF::ObjectListWatcher::~ObjectListWatcher </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Destructor. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="aa2edc92df3f8aafa339fce3400083c25"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa2edc92df3f8aafa339fce3400083c25">&#9670;&nbsp;</a></span>watch()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GCF::ObjectListWatcher::watch </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_g_c_f_1_1_object_list.html">ObjectList</a> &amp;&#160;</td>
          <td class="paramname"><em>list</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets the <a class="el" href="class_g_c_f_1_1_object_list.html">GCF::ObjectList</a> to watch. If there is already a watcher watching that <a class="el" href="class_g_c_f_1_1_object_list.html">GCF::ObjectList</a> then it will be replaced with this. </p>

</div>
</div>
<a id="a5edc32e488b5a09c4dd0636206061636"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5edc32e488b5a09c4dd0636206061636">&#9670;&nbsp;</a></span>listenerType()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QString GCF::ObjectListWatcher::listenerType </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>the listener type. By default listener type is "GCF::ObjectListEventListener". </dd></dl>

<p>Reimplemented from <a class="el" href="class_g_c_f_1_1_object_list_event_listener.html#a521de9fb96cc6934827df962b7336fd8">GCF::ObjectListEventListener</a>.</p>

</div>
</div>
<a id="a9cd563b47977c35ab0cbe2a48051951a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9cd563b47977c35ab0cbe2a48051951a">&#9670;&nbsp;</a></span>objectAdded</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">GCF::ObjectListWatcher::objectAdded </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>obj</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">signal</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This signal will be emitted when a <code>QObject</code> is added to the <a class="el" href="class_g_c_f_1_1_object_list.html">GCF::ObjectList</a>. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">index</td><td>index at which the object was inserted. </td></tr>
    <tr><td class="paramname">obj</td><td><code>QObject</code> added. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="afc3c791d13c6d682c0cd6ff20c6daa86"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afc3c791d13c6d682c0cd6ff20c6daa86">&#9670;&nbsp;</a></span>objectRemoved</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">GCF::ObjectListWatcher::objectRemoved </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>obj</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">signal</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This signal will be emitted when a <code>QObject</code> is removed from the <a class="el" href="class_g_c_f_1_1_object_list.html">GCF::ObjectList</a>. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">index</td><td>index from which the <code>QObject</code> was removed. </td></tr>
    <tr><td class="paramname">obj</td><td><code>QObject</code> removed. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aa53a614babe817a103b6ad3600f6e8a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa53a614babe817a103b6ad3600f6e8a0">&#9670;&nbsp;</a></span>objectDeleted</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">GCF::ObjectListWatcher::objectDeleted </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>obj</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">signal</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This signal will be emitted when a QObject is deleted from the <a class="el" href="class_g_c_f_1_1_object_list.html">GCF::ObjectList</a>. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">index</td><td>index of <code>QObject</code> in <a class="el" href="class_g_c_f_1_1_object_list.html">GCF::ObjectList</a> which got deleted. </td></tr>
    <tr><td class="paramname">obj</td><td><code>QObject</code> deleted. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div>
</div>
</div>
<div class="footer_content">
<table width="100%" class="footer">
<tr>
<td align="left" width="50%">Copyright &copy; 2013-2019,
 <a class="el" href="http://www.vcreatelogic.com" target="_black">VCreate Logic Private Limited</a></td>
<td align="right" width="50%"><a class="el" href="http://www.vcreatelogic.com/products/gcf" target="_black">GCF - Generic Component Framework</a></td>
</tr>
</table>
</div>
</div>
</body>
</html>
